class Calculator{
	public static int add(int a,int b)
	{
		return (a+b);
	}

	public static double area(double r)
	{
		return (3.14*r*r);
	}
	
	public static void leap(int year)
	{
		if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)){
		System.out.println("year "+year+" is a leap year");
		}
		else
		System.out.println("year "+year+" is not a leap year");
	}
	
	public static void oddev(int num)
	{
		if(num%2==0)
			System.out.println("num is even");
		else
			System.out.println("num is odd");
	}	
	
	public static int add3(int a,int b,int c)
	{
		return (a+b+c);
	}

	public static int addarr(int[] n)
	{
		int sum=0;
		for(int i=0;i<n.length;i++)
		{
			sum+=n[i];
		}
		return sum;
	}


	public static int[] fibb(int n) {
		int[] fib = new int[n];
		fib[0]=0;
		fib[1] = 1;

		for(int i=2; i<n; i++) {
			fib[i] = fib[i-1] + fib[i-2];
		}
		return fib;

	}
	public static int[] even(int from,int to)
	{
		int numm=(to-from);
		int i=0;
		int[] ev = new int[numm];
		while(numm<=to)
		{
			if(numm%2==0)
				ev[i]=numm;
			i++;	
			numm++;
		}
		return ev;
	}
		
	public static void odd()
	{
		int countodd=0,numm=0;
		while(numm<=100)
		{
			if(numm%2!=0)
			{
				countodd++;
				System.out.println(numm);
			}	
			numm++;
		}
	}

	public static void prime(int from,int to)
	{
		int countp=0;
		for(int i=from;i<=to;i++)
		{
			for(int j=1;j<=i;j++)
			{
					if(i%j==0)
						countp++;
			}
			if(countp==1 ||countp==2)
				printPrime(i);
			countp=0;			
		}
	}

	public static void printPrime(int n)
	{
		System.out.println(n);
	}
		
	
	public static void matAdd()
	{
		int [][] matr1={{2,4},{5,7}};
		int [][] matr2={{5,4},{2,6}};
		int [][] matr3= new int [2][2];
		for(int i=0;i<2;i++)
			for(int j=0;j<2;j++)
				matr3 [i][j] = matr1[i][j]+matr2[i][j];
		for(int i=0;i<2;i++){
			System.out.println();
			for(int j=0;j<2;j++)
				System.out.print(" "+matr3[i][j]+ "    ");
		}
	}
	
	
	public static void matMul()
	{
		int [][] matr1={{2,4},{5,7}};
		int [][] matr2={{5,4},{2,6}};
		int [][] matr3= new int [2][4];
		for(int i=0;i<2;i++){
			for(int j=0;j<2;j++){
				for(int k=0;k<2;k++){
				matr3 [i][j] = matr1[i][k]*matr2[k][j];
				
				}
			}
		}
		for(int i=0;i<2;i++){
			System.out.println();
			for(int j=0;j<2;j++)
				System.out.print(" "+matr3[i][j]+ "    ");
		}
		
	}
	
	

	public static void bubbleSort(int[] m)
	{
		for(int i=0;i<m.length;i++)
			for(int j=0;j<m.length-1;j++)
			{
				if(m[j]>m[j+1])
				{
					int temp=m[j];
					m[j]=m[j+1];
					m[j+1]=temp;
				}
			}
	}
	
	public static void countEvenOdd(int from,int to)
	{
		int counteven=0,countodd=0,numm=100;
		while(from<=to)
		{
			if(numm%2==0)
				counteven++;
			else 
				countodd++;
			from++;
		}
		System.out.println("number of even numbers from 100 to 200 is "+counteven);
		System.out.println("number of odd numbers from 100 to 200 is "+countodd);
		
	}				 
}
		